package com.itheima.health.service.impl;

import com.itheima.health.dao.MenuDao;
import com.itheima.health.pojo.Menu;
import com.itheima.health.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class MenuServiceImpl implements MenuService {
    @Autowired
    private MenuDao menuDao;
    @Override
    public List<Menu> findParentMenu(Integer roleId) {
        List<Menu> menus = menuDao.selectParentMenu(roleId);
        return menus;
    }

    @Override
    public List<Menu> findChildMenu(Integer roleId, Integer parentId) {
        List<Menu> menus = menuDao.selectChildMenu(roleId, parentId);
        return menus;

    }
}
